﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;

namespace FileManager_Client.PresentationLayer.NewUi
{
    public partial class XtraForm2 : DevExpress.XtraEditors.XtraForm
    {
        public XtraForm2()
        {
            InitializeComponent();

            List<TestClass2> testClass2s = new List<TestClass2>();
            for (int i = 0; i < 5; i++)
            {
                testClass2s.Add(new TestClass2
                                    {
                                        name = i.ToString()
                                    });
            }
            listViewEx1.AddObjects(testClass2s);
            foreach (ListViewItem i in listViewEx1.Items)
            {

                var progressBarControl = new ProgressBarControl();
                var simpleButton = new SimpleButton {Text = "1111"};
                //ProgressBar pb = new ProgressBar();
                //pb.Value = cnt;
                //pb.Click += new EventHandler(pb_Click);

                // Embed the ProgressBar in Column 2
                listViewEx1.AddEmbeddedControl(progressBarControl, 1, i.Index);
                listViewEx1.AddEmbeddedControl(simpleButton,2,i.Index);
            }
        }

    }

    public class TestClass2
    {
        public string name { get; set; }
        public string name2 { get; set; }
        public string name3 { get; set; }
        public string name4 { get; set; }
    }
}